#!/bin/sh
#by kevin
#2019/4/16
logger "network protect" "protection starting!"
count=0
while sleep 120
do
	ping -I apclii0 -c 4 114.114.114.114 > /dev/null
	if [ $? != 0 ]; then
		/etc/init.d/network restart
		/root/login.sh
		count=$(( $count + 1 ))
		if [ $count == 3 ]; then
			reboot
		fi
	fi
done
